1. Field of the Invention
The present invention relates to a current sense integrated circuit for motor current measurement, and, more specifically, to a current sense integrated circuit which eliminates ripple current error from the motor current measurement.
2. Description of the Related Art
Linear current sense integrated circuit chips, such as the IR2171, have been introduced in recent years for measuring motor current. The circuitry of the IR2171 current sense IC is disclosed and claimed in U.S. Pat. No. 6,215,435. As described in U.S. Pat. No. 6,215,435, the IR2171 linear current sense IC advantageously measures current flow at a high voltage potential, such as across a current sense resistor disposed in the path between the power switching node and the motor, and then level shifts the signal to a lower voltage potential for further processing, the output ultimately being used to close a current feedback loop to control the motor. As described in the ""435 patent, the current sense signal at the high potential may be small as compared to the large common mode potential, making the current sense signal difficult to isolate.
The IR2171 linear current sense IC addresses this problem by providing a circuit which converts the high voltage current sense signal to a PWM signal, and then level shifts the PWM signal. To limit power consumption, the PWM signal at the high potential is converted into a current pulse train prior to level shifting to the low potential at which the current sense signal is recovered.
Regardless of whether the IR2171 IC or some other device is used to measure motor phase current, it is the fundamental frequency component of the PWM motor phase current that is desired, rather than the fundamental plus or minus the ripple current of motor current. The magnitude of the ripple current can be quite large compared to the fundamental motor current, particularly for low inductance motor types or for motors being driven at low PWM frequencies.
In most cases, the current feedback loop is closed in software, so a microcontroller or Digital Signal Processor (DSP) connected to the current sense IC periodically samples motor current. If motor current is sampled at a frequency that is not harmonically related to the PWM frequency, then aliasing errors will corrupt the measurements. The magnitude of the aliasing error will be equal to the ripple current magnitude. To reduce these errors, the software is usually written to sample the current synchronously with the PWM frequency of the motor current.
However, even if the sampling command could be perfectly timed to the PWM signal, errors still occur because of bandwidth limitations (phase delay) of conventional current measurement techniques. Moreover, sampling time is usually a compromise because of interrupts occurring to the software routine, and multiple current channels can not be simultaneously sampled in most microcontrollers or DSPs.
The present invention provides a circuit and method for current sensing, which has the ability to synchronize into the PWM motor carrier frequency and effectively remove ripple fluctuation of the motor current feedback signal due to the motor PWM switching.
The circuit of the present invention is preferably embodied in the form of an IC which measures the voltage across a shunt resistor in the motor phase current path. The IC converts the measured current into a PWM signal synchronous with the motor PWM frequency. Although the output of the IC is synchronous with the motor PWM frequency, the output duty cycle is completely independent of the motor PWM duty cycle: The output PWM duty cycle is exactly proportional to average motor current during that PWM period. In this way, the reconstructed sampled output of the IC is exactly equal to the fundamental motor current, without the effect of ripple current.
Other features and advantages of the present invention will become apparent from the following description of the invention which refers to the accompanying drawings.